<template>
  <ContainerGroup>
    <Container style="margin-bottom:10px;">
      <FilterForm ref="filterForm" :elements="queryForm" @reset="reset" @submit="handleSearch">
        <Button
          style="display: inline-block;margin-right:10px;"
          @click="handleCheck"
        >检查</Button>
      </FilterForm>
    </Container>
    <!-- 表格主体 -->
    <Container
      height="fill"
      display="flexY"
    >
      <!-- 按钮 -->
      <OperationContainer class="button-bar">
        <Button icon="add" @click="addDetail">添加</Button>
        <!-- <Button type="info">保存</Button> -->
        <Button type="info" @click="handleJc">继承</Button>
        <!-- <Button>导出数据</Button> -->
      </OperationContainer>

      <!-- 表格 -->
      <div class="table-box">
        <el-table
          v-loading="tableLoading"
          height="100%"
          :data="ruleDetail"
          default-expand-all
          border
          :header-cell-style="{
            background: '#fafafa',
            borderColor: '#e7ecf8',
          }"
          row-key="code"
        >
          <!-- <el-table-column align="center" type="selection" width="55" /> -->
          <el-table-column
            align="center"
            type="index"
            label="序号"
            width="60"
          />
          <el-table-column prop="extendField1" label="年" />
          <el-table-column prop="extendField2" label="月" />
          <el-table-column label="科室编码" prop="deptCode">
          <!-- <template slot-scope="scope">
            <div class="text-btn">
              {{
                scope.row.deptCode === "AAAAAAAAAA"
                  ? "9999"
                  : scope.row.deptCode
              }}
            </div>
          </template> -->
          </el-table-column>
          <el-table-column prop="deptName" label="科室名称" />
          <el-table-column prop="deptTypeName" label="核算单元" />
          <el-table-column prop="amortizationName" label="分摊类型" />
          <!-- <el-table-column align="center" label="是否启用" width="120">
            <template slot-scope="scope">
              <el-switch
                v-model="scope.row.rowStatus"
                active-color="#FFA712"
                :active-value="'0'"
                :inactive-value="'1'"
                @change="switchUse(scope.row)"
              />
            </template>
          </el-table-column> -->
          <el-table-column align="center" label="操作" width="120">
            <template slot-scope="scope">
              <!-- <span class="edit-detail" @click="editDetail(scope.row)">修改</span> -->
              <el-tooltip
                class="item"
                effect="dark"
                content="编辑"
                placement="top"
              >
                <i
                  class="el-icon-edit-outline"
                  style="
                      padding-top: 4px;
                      font-size: 20px;
                      color: #207efa;
                      cursor: pointer;
                    "
                  @click="editDetail(scope.row)"
                />
              </el-tooltip>
              <el-tooltip
                class="item"
                effect="dark"
                content="删除"
                placement="top"
                style="margin-left: 10px"
              >
                <i
                  class="el-icon-delete"
                  style="
                      padding-top: 4px;
                      font-size: 20px;
                      color: #207efa;
                      cursor: pointer;
                    "
                  @click="deleteDetail(scope.row)"
                />
              </el-tooltip>
            </template>
          </el-table-column>
        </el-table>
      </div>

      <!-- 分页 -->
      <!-- <Pagination
          :total="pageAttr.total"
          :page="pageAttr.currentPage"
          :page-size="pageAttr.pageSize"
          @pagation="pagationChange"
        /> -->
      <!-- 对话框区域开始 -->
      <el-dialog
        :title="dialogTitle2"
        :visible.sync="dialogVisible2"
        width="40%"
      >
        <el-form ref="form2" :model="form2" label-width="120px">
          <el-form-item label="年份：">
            <el-input v-model="form2.year" clearable style="width: 100%" />
          </el-form-item>
          <el-form-item label="月份：">
            <el-input v-model="form2.month" clearable style="width: 100%" />
          </el-form-item>
        </el-form>
        <span slot="footer" class="dialog-footer">
          <el-button @click="dialogClose2">取 消</el-button>
          <el-button type="primary" @click="dialogCommit2">确 定</el-button>
        </span>
      </el-dialog>
      <!-- 对话框区域结束 -->

      <!-- 弹层区域开始 -->
      <Dialog
        :title="drawerTitle"
        :visible="showEidtVlidate"
        :footer-btns="[
          {
            text: '确定',
            type: 'primary',
            trigger: 'confirm',
          },
          {
            text: '关闭',
            type: 'info',
            trigger: 'cancel',
          },
        ]"
        @confirm="saveEidtRule"
        @cancel="drawClose"
      >
        <el-form
          ref="form"
          :model="form"
          label-width="90px"
          size="small"
        >
          <el-form-item label="年月:">
            <el-date-picker
              v-model="form.yearMonth"
              clearable
              size="small"
              type="month"
              placeholder="请选择年月"
              format="yyyy-MM"
              value-format="yyyy-MM"
              :picker-options="expireTimeOptionBm"
              :disabled="isEdit"
            />
          </el-form-item>
          <el-form-item label="科室名称:">
            <el-select v-model="form.edName" clearable filterable style="width:100%;" :disabled="isEdit">
              <template v-for="(item, index) in dpNameType">
                <el-option
                  :key="index"
                  :value="item.deptCode + '/' + item.deptName"
                  :label="item.deptName"
                />
              </template>
            </el-select>
          </el-form-item>
          <el-form-item label="分摊类型：">
            <el-select v-model="form.deptTypetext" clearable filterable style="width:100%;">
              <template v-for="(item, index) in deptType">
                <el-option
                  v-if="item.edName"
                  :key="index"
                  :value="item.edCode + '/' + item.edName"
                  :label="item.edName"
                />
              </template>
            </el-select>
          </el-form-item>
        </el-form>
      </Dialog>
      <!-- 继承 -->
      <Dialog
        title="继承"
        :visible="jcVisable"
        :footer-btns="[
          {
            text: '确定',
            type: 'primary',
            trigger: 'confirm',
          },
          {
            text: '关闭',
            type: 'info',
            trigger: 'cancel',
          },
        ]"
        @confirm="handleSaveJc"
        @cancel="jcVisable = false"
      >
        <el-form ref="form" label-width="80px">
          <el-form-item label="源年月:">
            <el-date-picker
              v-model="ruleName"
              clearable
              size="small"
              type="month"
              placeholder="请选择年月"
              format="yyyy-MM"
              value-format="yyyy-MM"
              :picker-options="expireTimeOptionBm"
            />
          </el-form-item>
          <el-form-item label="目标年月:">
            <el-date-picker
              v-model="mbYm"
              clearable
              size="small"
              type="month"
              placeholder="请选择年月"
              format="yyyy-MM"
              value-format="yyyy-MM"
              :picker-options="expireTimeOptionBm"
            />
          </el-form-item>
        </el-form>
      </Dialog>
      <Drawer
        :visible="tableDialog"
        title="检查"
        :footer-btns="[
          {
            text: '取消',
            type: 'info',
            trigger: 'cancel',
          },
        ]"
        width="300px"
        @cancel="tableDialog = false"
      >
        <div class="jc-wraper">
          <div
            v-for="(item, index) in tableDataDialog"
            :key="index"
            class="jc-item"
          >
            <span>科室编号: {{ item.deptCode }}</span>,
            <span>科室名称: {{ item.deptName }}</span>
          </div>
        </div>
      </Drawer>
    </Container>
  </ContainerGroup>
</template>

<script>
import TimeSelector from './children/TimeSelector.vue'
import {
  getEnumDetailSource,
  ruleAaddRuleAmortization,
  getDepartmentSource,
  getRuleAmortization,
  getRuleAmortizationById,
  modifyRuleAmortization,
  insertBatchRuleAmortization,
  checkNoAmortizationDept
} from '../../../utils/apis/accountingUnit/share.js'
import { BasicParams } from '../../../utils/basicParams'
import { ShareParams } from '../../../utils/shareParams'
import { batchDeleteRuleAmortization } from '../../../utils/apis/basic'
import { FlowInShare } from '../../../utils/flowInShare'
export default {
  name: 'Dept', // 科室分摊
  components: {
    // eslint-disable-next-line vue/no-unused-components
    TimeSelector
  },
  data() {
    const _this = this
    return {
      tableDataDialog: [],
      tableDialog: false,
      expireTimeOptionBm: {
        disabledDate(date) {
          // disabledDate 文档上：设置禁用状态，参数为当前日期，要求返回 Boolean
          return (
            date.getTime() > new Date(_this.$util.currentDate(1)).getTime()
          )
        }
      },
      tableLoading: false,
      ruleList: [],
      ruleName: _this.$util.currentDate(2),
      mbYm: _this.$util.currentDate(1),
      jcVisable: false,
      rowId: '',
      isDiasbled: false,
      pageAttr: {
        pageSize: 20,
        currentPage: 1,
        total: 0
      },
      height: 'fill',
      dpNameType: [],
      form: {
        edName: '',
        id: '',
        deptTypetext: '',
        yearMonth: _this.$util.currentDate(1)
      },
      queryForm: [
        // {
        //   clearable: true,
        //   value: "",
        //   // remote: true,
        //   // remoteMethod: this.unitFilter,
        //   itemLabel: "code",
        //   itemValue: "value",
        //   label: "年月",
        //   key: "timeType",
        //   type: "Select",
        //   options: [],
        // },
        {
          key: 'timeType',
          label: '年/月',
          mode: 'month',
          type: 'date-picker',
          format: 'yyyy-MM',
          value: this.$util.currentDate(),
          width: 210,
          defaultValue: this.$util.currentDate()
        },
        {
          filterable: true,
          clearable: true,
          label: '分摊类型',
          key: 'shareType',
          type: 'Select',
          itemLabel: 'edName',
          itemValue: 'edCode',
          options: []
        },
        {
          filterable: true,
          label: '核算单元',
          key: 'edCode',
          type: 'Select',
          clearable: true,
          value: '',
          remote: true,
          remoteMethod: this.unitFilter,
          itemLabel: 'edName',
          itemValue: 'edCode',
          options: []
        },
        {
          label: '科室/部门',
          key: 'deptCode',
          type: 'select',
          clearable: true,
          value: '',
          remoteMethod: this.deptFilter,
          filterable: true,
          remote: true,
          itemLabel: 'deptName',
          itemValue: 'deptCode',
          options: []
        }
      ],
      apportionType: [
        {
          name: '职工人数',
          code: '101',
          word: 'lcfw',
          isDefault: '1'
        },
        {
          name: '房屋面积',
          code: '102',
          word: 'yljs',
          isDefault: '0'
        },
        {
          name: '出院人数',
          code: '103',
          word: 'ylfz',
          isDefault: '0'
        },
        {
          name: '门诊人次',
          code: '104',
          word: 'xzhq',
          isDefault: '0'
        }
      ],
      // 规则详情表单
      ruleDetail: [],
      tableData: {
        lcfw: [
          {
            code: 'ZC5001',
            name: '工资外奖金补贴',
            clinicType: '工资和补贴',
            deptType: '资产化成本',
            hospitalZone: '可控',
            bdxt: '固定成本',
            isDealingsBill: '1',
            isUse: '1',
            time: '2021-09-23 08:08:10',
            isChild: '0'
          },
          {
            code: 'ZC5002',
            name: '横向科研基金',
            clinicType: '工资和补贴',
            deptType: '资产化成本',
            hospitalZone: '可控',
            bdxt: '固定成本',
            isDealingsBill: '1',
            isUse: '1',
            time: '2021-09-23 08:08:10',
            isChild: '1'
          },
          {
            code: 'ZC5003',
            name: '职位（岗位）工资',
            clinicType: '工资和补贴',
            deptType: '资产化成本',
            hospitalZone: '可控',
            bdxt: '固定成本',
            isDealingsBill: '1',
            isUse: '0',
            time: '2021-09-23 08:08:10',
            isChild: '1'
          },
          {
            code: 'ZC5004',
            name: '工资外奖金补贴',
            clinicType: '工资和补贴',
            deptType: '资产化成本',
            hospitalZone: '可控',
            bdxt: '固定成本',
            isDealingsBill: '1',
            isUse: '1',
            time: '2021-09-23 08:08:10',
            isChild: '0'
          },
          {
            code: 'ZC5005',
            name: '横向科研基金',
            clinicType: '工资和补贴',
            deptType: '资产化成本',
            hospitalZone: '可控',
            bdxt: '固定成本',
            isDealingsBill: '1',
            isUse: '1',
            time: '2021-09-23 08:08:10',
            isChild: '1'
          },
          {
            code: 'ZC5006',
            name: '职位（岗位）工资',
            clinicType: '工资和补贴',
            deptType: '资产化成本',
            hospitalZone: '可控',
            bdxt: '固定成本',
            isDealingsBill: '1',
            isUse: '0',
            time: '2021-09-23 08:08:10',
            isChild: '1'
          },
          {
            code: 'ZC5007',
            name: '工资外奖金补贴',
            clinicType: '工资和补贴',
            deptType: '资产化成本',
            hospitalZone: '可控',
            bdxt: '固定成本',
            isDealingsBill: '1',
            isUse: '1',
            time: '2021-09-23 08:08:10',
            isChild: '0'
          },
          {
            code: 'ZC5008',
            name: '横向科研基金',
            clinicType: '工资和补贴',
            deptType: '资产化成本',
            hospitalZone: '可控',
            bdxt: '固定成本',
            isDealingsBill: '1',
            isUse: '1',
            time: '2021-09-23 08:08:10',
            isChild: '1'
          },
          {
            code: 'ZC5009',
            name: '职位（岗位）工资',
            clinicType: '工资和补贴',
            deptType: '资产化成本',
            hospitalZone: '可控',
            bdxt: '固定成本',
            isDealingsBill: '1',
            isUse: '0',
            time: '2021-09-23 08:08:10',
            isChild: '1'
          }
        ],
        xzhq: [
          {
            code: '5004',
            name: '心血管内科',
            clinicType: null,
            deptType: '行政后勤科室',
            hospitalZone: '浒关院区',
            isDealingsBill: '1',
            isUse: '1',
            isChild: '0'
          },
          {
            code: '500410',
            name: '心血管内科门诊',
            clinicType: '门诊',
            deptType: '行政后勤科室',
            hospitalZone: '浒关院区',
            isDealingsBill: '1',
            isUse: '1',
            isChild: '1'
          },
          {
            code: '500420',
            name: '心血管内科住院',
            clinicType: '住院',
            deptType: '行政后勤科室',
            hospitalZone: '浒关院区',
            isDealingsBill: '1',
            isUse: '0',
            isChild: '1'
          }
        ]
      },
      yearList: [],
      isEdit: false,
      form2: {
        year: '',
        month: ''
      },
      deptType: [],
      dialogTitle2: '',
      dialogVisible2: false,
      showEidtVlidate: false,
      drawerTitle: '',
      newParamList: {}
    }
  },
  created() {
    this.getinit()
    this.getDetName()
  },
  mounted() {
  },
  methods: {
    handleCheck(value) {
      const fieldVal = this.$refs.filterForm.getParms()
      const param = {
        year: fieldVal?.timeType.split('-')[0],
        month: fieldVal?.timeType.split('-')[1]
      }
      this.tableDataDialog = []
      checkNoAmortizationDept(param).then((res) => {
        if (res.data.code === 200) {
          this.tableDialog = true
          this.tableDataDialog = res.data.data
        }
      })
    },
    handleSearch(value) {
      this.newParamList = value
      this.getData(value)
    },
    handleSaveJc() {
      if (!this.ruleName) {
        this.$message.warning('请选择源年月')
        return
      }
      if (!this.mbYm) {
        this.$message.warning('请选择目标年月')
        return
      }
      const flowInShare = new FlowInShare()
      flowInShare.yearSource = this.ruleName.split('-')[0]
      flowInShare.monthSource = this.ruleName.split('-')[1]
      flowInShare.yearTarget = this.mbYm.split('-')[0]
      flowInShare.monthTarget = this.mbYm.split('-')[1]
      insertBatchRuleAmortization(flowInShare).then((res) => {
        if (res.data.code === 200) {
          this.$message.success(res.data.message)
          this.getData()
          this.jcVisable = false
        } else {
          this.$message.error(res.data.message)
        }
      })
    },
    handleCancleJc() {
      this.jcVisable = false
    },
    handleJc() {
      // 继承
      this.ruleName = this.$util.currentDate(2)
      this.mbYm = this.$util.currentDate(1)
      this.jcVisable = true
    },
    // 删除
    deleteDetail(row) {
      this.$confirm({
        content: '是否确认删除？',
        title: '温馨提示',
        okFn: (res) => {
          const ids = [row.id]
          batchDeleteRuleAmortization(ids).then((res) => {
            if (res.data.code === 200) {
              this.$message({
                type: 'success',
                message: '删除成功!'
              })
              // 请求成功后刷新数据
              this.getData()
            }
          })
        }
      })
    },
    getinit() {
      const basicParams = new BasicParams()
      // basicParams.edExtraFirstCode = "";
      // basicParams.edExtraFirstDescription = "";
      // basicParams.edCode = "";
      // basicParams.edName = "";
      basicParams.edId = 0
      basicParams.edParentCode = 'BD_Amortization'
      getEnumDetailSource(basicParams).then((res) => {
        if (res.data.code === 200) {
          this.queryForm[1].options = res.data.data
          this.deptType = res.data.data
        } else {
          this.$message.error(res.data.message)
        }
      })

      // getYearMonth().then((res) => {
      //   if (res.data.code === 200) {
      //     this.queryForm[0].options = res.data.data;
      //     this.ruleList = res.data.data;
      //     this.$nextTick(() => {
      //       this.queryForm[0].value = res.data.data[0].value;
      //     });
      //   }
      // });
    },
    getDetName() {
      const basicParams = new BasicParams()
      // basicParams.edExtraFirstCode = "";
      // basicParams.edExtraFirstDescription = "";
      // basicParams.edCode = "";
      // basicParams.edName = "";
      basicParams.edId = 0
      basicParams.edParentCode = 'BD_DepartCategory'
      getEnumDetailSource(basicParams).then((res) => {
        if (res.data.code === 200) {
          this.queryForm[2].options = res.data.data
        } else {
          this.$message.error(res.data.message)
        }
      })
      getDepartmentSource({
        projectId: '1',
        SysId: 'Cost'
      }).then((res) => {
        if (res.data.code === 200) {
          this.dpNameType = res.data.data
        }
      })
    },
    deptFilter(val) {
      getDepartmentSource({
        projectId: '1',
        deptName: val,
        isLike: true
      }).then((res) => {
        if (res.data.code === 200) {
          this.queryForm[3].options = res.data.data
        }
      })
    },
    getData() {
      const shareParams = new ShareParams()

      shareParams.yearTarget = this.newParamList.timeType.split('-')[0]

      shareParams.monthTarget = this.newParamList.timeType.split('-')[1]

      shareParams.yearMonth = this.newParamList.timeType
      shareParams.deptCode = this.newParamList.deptCode
      shareParams.deptTypeID = this.newParamList.edCode
      shareParams.amortizationCode = this.newParamList.shareType
      // shareParams.pageIndex = this.pageAttr.currentPage;
      // shareParams.pageSize = this.pageAttr.pageSize;
      this.tableLoading = true
      this.ruleDetail = []
      getRuleAmortization(shareParams).then((res) => {
        this.tableLoading = false
        if (res.data.code === 200) {
          this.ruleDetail = res.data.data
          // this.pageAttr.total = res.data.data.total || 0;
        }
      })
    },
    // 分页
    pagationChange(payload) {
      this.pageAttr.currentPage = payload.page
      this.pageAttr.pageSize = payload.pageSize
      this.getData()
    },
    stopDefault(e) {
      e.stopPropagation()
    },
    rowClick(row) {
      // const word = row.word
      // this.ruleDetail = this.tableData[word];
    },
    addDetail() {
      this.isEdit = false
      this.showDetail()
    },
    editDetail(row) {
      this.rowId = row.id
      this.isEdit = true
      this.showDetail(row)
    },
    showDetail(row) {
      const shareParams = new ShareParams()
      this.showEidtVlidate = true
      if (this.isEdit) {
        this.isDiasbled = true
        this.drawerTitle = '编辑'
        shareParams.id = row.id
        getRuleAmortizationById(shareParams).then((res) => {
          if (res.data.code === 200) {
            this.form.edName =
              res.data.data.deptCode + '/' + res.data.data.deptName
            this.form.deptTypetext =
              res.data.data.amortizationCode +
              '/' +
              res.data.data.amortizationName
            this.form.id = res.data.data.id
          } else {
            this.$message.error(res.data.message)
          }
        })
      } else {
        this.isDiasbled = false
        this.drawerTitle = '新增'
        this.form.deptTypetext = ''
        this.form.edName = ''
        this.form.yearMonth = this.$util.currentDate(1)
      }
    },
    switchUse(row) {
      const flowInShare = new FlowInShare()
      flowInShare.id = row.id
      flowInShare.rowStatus = row.rowStatus
      modifyRuleAmortization(flowInShare).then((res) => {
        if (res.data.code === 200) {
          this.$message.success(res.data.message)
          this.getData()
        } else {
          this.$message.error(res.data.message)
        }
      })
    },
    // 向FilterForm中的Select-Options追加选项
    addSeletOption(label, opts) {
      this.queryForm.map((item) => {
        if (item.label === label) {
          item.options = opts
        }
      })
    },
    setDefault(row) {
      // console.log(row);
    },
    reset() {
      this.pageAttr.currentPage = 1
    },
    drawClose() {
      this.showEidtVlidate = false
    },
    saveEidtRule() {
      if (!this.form.edName) {
        this.$message.warning('请选择科室名称')
        return
      }
      if (!this.form.deptTypetext) {
        this.$message.warning('请选择分摊类型')
        return
      }
      const shareParams = new ShareParams()
      shareParams.deptName = this.form.edName.split('/')[1]
      shareParams.deptCode = this.form.edName.split('/')[0]
      shareParams.amortizationCode = this.form.deptTypetext.split('/')[0]// 编号
      shareParams.amortizationName = this.form.deptTypetext.split('/')[1]

      shareParams.yearTarget = this.form.yearMonth.split('-')[0]

      shareParams.monthTarget = this.form.yearMonth.split('-')[1]
      if (this.isEdit) {
        // 编辑
        shareParams.id = this.rowId
        modifyRuleAmortization(shareParams).then((res) => {
          if (res.data.code === 200) {
            this.$message.success(res.data.message)
            this.getData()
            this.showEidtVlidate = false
          } else {
            this.$message.error(res.data.message)
          }
        })
      } else {
        // 新增
        ruleAaddRuleAmortization(shareParams).then((res) => {
          if (res.data.code === 200) {
            this.$message.success(res.data.message)
            this.getData()
            this.showEidtVlidate = false
          } else {
            this.$message.error(res.data.message)
          }
        })
      }
    },
    // 获取页面选择时间
    getTypeByTime(time) {
      // console.log(time);
    },
    // 设置默认选中第一行
    setFirstRowSelected() {
      this.$refs.table.setCurrentRow(this.$refs.table.data[0])
    },
    addRule() {
      this.dialogTitle2 = '添加规则'
      this.dialogVisible2 = true
    },
    dialogClose2() {
      this.dialogVisible2 = false
      this.$refs.form2.resetFields()
    },
    dialogCommit2() {
      this.dialogVisible2 = false
      this.$refs.form2.resetFields()
    }
  }
}
</script>

<style lang="less" scoped>
.dept-type {
  padding: 0 !important;
  flex: 0 0 240px;
  margin-right: 10px;
}
.time-box {
  padding: 0 !important;
  flex: 0 0 240px;
  margin-right: 10px;
}
.time-box {
  display: flex;
  flex-direction: column;
  .title {
    height: 39.5px;
    flex: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .outside {
    flex: 1;
  }
}
.rule-detail {
  padding: 0 !important;
  flex: 1;
}
.title {
  box-sizing: border-box;
  padding: 10px;
  width: 100%;
  background-color: #fefefe;
  border-bottom: 1px solid #e8eaed;
}
.edit-detail {
  color: #4073ff;
  cursor: pointer;
}
.button-bar {
  height: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  padding-left: 12px;
  // border-bottom: 1px solid #ccc;
  button {
    margin-left: 12px;
  }
  button:first-of-type {
    margin-left: 0;
  }
}
.is-child {
  display: inline-block;
  padding-left: 12px;
}
.not-child {
  font-weight: bold;
}
.table-box {
flex: 1;
}
.query-form {
  // border-bottom: 1px solid #ccc;
  button {
    margin-left: 12px;
  }
}
.is-default {
  color: #4073ff;
  cursor: pointer;
}
.query-box {
  flex: 1;
}
/deep/ .dept-type .el-table--enable-row-hover .el-table__body tr:hover > td {
  background-color: #217dfa;
  color: #fff;
}
/deep/ .el-table__body tr.current-row > td {
  background-color: #217dfa;
  color: #fff;
}
.jc-wraper {
  margin: 10px 15px;
  height: calc(100% - 20px);
  overflow-y: auto;
  .jc-item {
    font-size: 12px;
    line-height: 1.7;
  }
}
</style>
